package chapter04;

public class ArrayQueue1 {
    public static void main(String[] args) {

    }
}
class Arrayqueue{
    private int maxSize;//最大数组容量
    private int front;
    private int rear;
    private int[] arr;

    public void ArrayQueue(int arrMaxSize){
        maxSize=arrMaxSize;
        arr= new int[maxSize];
        front=-1;
        rear=-1;

    }
    public boolean isFull(){
        return rear== maxSize-1;

    }
    public boolean isEmpty(){
        return rear==front;

    }
    public void addQueue(int n){
        if(isFull()){
            System.out.println("full");
        }
        rear++;
        arr[rear]=n;

    }

}
